package com.example.skindemo.loader;

import android.content.Context;
import android.util.Log;

import java.io.File;

import skin.support.load.SkinSDCardLoader;

// 自定义加载策略，指定SDCard路径
public class CustomSDCardLoader extends SkinSDCardLoader {
    public static final int SKIN_LOADER_STRATEGY_SDCARD = Integer.MAX_VALUE;

    @Override
    protected String getSkinPath(Context context, String skinName) {

        String filepath = new File(CustomSkinFileUtils.getSkinDir(context), skinName).getAbsolutePath();
        Log.i("测试 SD卡下的地址", "" + filepath);
        return filepath;
    }

    @Override
    public int getType() {
        return SKIN_LOADER_STRATEGY_SDCARD;
    }
}
